import os
import shutil
import verified_path


def move_files_by_type(file_extension, destination_path):
    found_files = False

    # 检查当前目录中的文件
    for file_name in os.listdir():
        if file_name.endswith(file_extension):
            found_files = True

            # 构建完整的源文件路径
            source_path = os.path.join(os.getcwd(), file_name)

            # 构建目标文件路径
            destination_file_name = os.path.join(destination_path, file_name)

            # 移动文件
            shutil.move(source_path, destination_file_name)

    if not found_files:
        print("找不到文件，无法移动")


destination: str = verified_path.get_site_path()

# 用法示例
move_files_by_type(".pth", destination)
